->set( 'replace_schema_domain', isset( $_POST['replace_schema_domain'] ) ); $this->option->set( 'enable_schema_endpoint', isset( $_POST['enable_schema_endpoint'] ) ); } if ( isset( $_POST['is_needed_breadcrumb'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- validation is done in validate_submit. $validated_is_needed_breadcrumb = $this->validate_submit( $_POST['is_needed_breadcrumb'] ); $this->option->set( 'is_needed_breadcrumb', $validated_is_needed_breadcrumb ); } if ( isset( $_POST['is_needed_webpage'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- validation is done in validate_submit. $validated_is_needed_webpage = $this->validate_submit( $_POST['is_needed_webpage'] ); $this->option->set( 'is_needed_webpage', $validated_is_needed_webpage ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Makes sure we only store data we know how to deal with. * * @param string $value The submitted value. * * @return string The validated submit value. */ private function validate_submit( $value ) { $value = (string) $value; if ( \in_array( $value, [ 'none', 'show', 'hide' ], true ) ) { return $value; } return 'none'; } /** * Replaces your .test domain name with example.com in JSON output. * * @param array $data Data to replace the domain in. * * @return array Data to replace the domain in. */ public function replace_domain( $data ) { $source = WPSEO_Utils::get_home_url(); $target = 'https://example.com'; if ( $source[ ( \strlen( $source ) - 1 ) ] === '/' ) { $source = \substr( $source, 0, -1 ); } return $this->array_value_str_replace( $source, $target, $data ); } /** * Returns the current breadcrumb option as boolean. * * @return bool */ public function filter_is_needed_breadcrumb() { return $this->option->get( 'is_needed_breadcrumb' ) === 'show'; } /** * Returns the current webpage option as boolean. * * @return bool */ public function filter_is_needed_webpage() { return $this->option->get( 'is_needed_webpage' ) === 'show'; } /** * Deep replaces strings in an array. * * @param string $needle The needle to replace. * @param string $replacement The replacement. * @param array $subject The array to replace in. * * @return array The array with needle replaced by replacement in strings. */ private function array_value_str_replace( $needle, $replacement, $subject ) { if ( \is_array( $subject ) ) { foreach ( $subject as $key => $value ) { if ( \is_array( $value ) ) { $subject[ $key ] = $this->array_value_str_replace( $needle, $replacement, $subject[ $key ] ); } elseif ( \strpos( $value, $needle ) !== false ) { $subject[ $key ] = \str_replace( $needle, $replacement, $value ); } } } return $subject; } }
Fatal error: Uncaught Error: Class 'Yoast\WP\Test_Helper\Schema' not found in /var/www/html/cooperativismodecredito.coop.br/web/wp-content/plugins/yoast-test-helper/src/plugin.php:84 Stack trace: #0 /var/www/html/cooperativismodecredito.coop.br/web/wp-content/plugins/yoast-test-helper/src/plugin.php(29): Yoast\WP\Test_Helper\Plugin->load_integrations() #1 /var/www/html/cooperativismodecredito.coop.br/web/wp-content/plugins/yoast-test-helper/yoast-test-helper.php(44): Yoast\WP\Test_Helper\Plugin->__construct() #2 /var/www/html/cooperativismodecredito.coop.br/web/wp-settings.php(517): include_once('/var/www/html/c...') #3 /var/www/html/cooperativismodecredito.coop.br/web/wp-config.php(105): require_once('/var/www/html/c...') #4 /var/www/html/cooperativismodecredito.coop.br/web/wp-load.php(50): require_once('/var/www/html/c...') #5 /var/www/html/cooperativismodecredito.coop.br/web/wp-blog-header.php(13): require_once('/var/www/html/c...') #6 /var/www/html/cooperativismodecredito.coop.br/web/index.php(17): require('/var/www/h in /var/www/html/cooperativismodecredito.coop.br/web/wp-content/plugins/yoast-test-helper/src/plugin.php on line 84